<template>
    <div>
        <h1 v-text="msg" ref="title"></h1>
        <button @click="showDom">点我输出上方Dom元素</button>
    </div>

</template>

<script>
    import School from './components/School'
export default {
    name:'APP',
    components:{School},
    data() {
        return {
            msg:'欢迎来到尚硅谷'
        }
    },
    methods:{
        showDom(){
            console.log(this.$refs.title)
        }
    }
}
</script>

<style>

</style>